export interface UserInfo {
  id: number;
  password: string;
  realName: string;
  roles: string[];
  username: string;
  homePath?: string;
  companyName?: string;
}

export const MOCK_USERS: UserInfo[] = [
  {
    id: 0,
    password: '123456',
    realName: '黄晓东',
    roles: ['super'],
    username: 'admin',
    homePath: '/visitor-management',
    companyName: '广州名创有限公司',
  },
  {
    id: 1,
    password: '123456',
    realName: '黄晓东',
    roles: ['admin'],
    username: 'admin',
    homePath: '/visitor-management',
    companyName: '广州名创有限公司',
  },
  {
    id: 2,
    password: '123456',
    realName: '黄晓东',
    roles: ['user'],
    username: 'jack',
    homePath: '/visitor-management',
    companyName: '广州名创有限公司',
  },
];

export const MOCK_CODES = [
  // super
  {
    codes: ['AC_100100', 'AC_100110', 'AC_100120', 'AC_100010'],
    username: 'vben',
  },
  {
    // admin
    codes: ['AC_100010', 'AC_100020', 'AC_100030'],
    username: 'admin',
  },
  {
    // user
    codes: ['AC_1000001', 'AC_1000002'],
    username: 'jack',
  },
];

// 游人管理相关接口
export interface VisitorInfo {
  id: number;
  name: string;
  age: number;
  profession: string;
  city: string;
  expertise: string[];
  skills: string[];
  experience: string;
  isCollected: boolean;
  status: 'assigned' | 'completed' | 'idle' | 'testing';
  avatar?: string;
  description?: string;
  gender?: '女' | '男';
}

export const MOCK_VISITORS: VisitorInfo[] = [
  {
    id: 1,
    name: '马冬梅',
    age: 23,
    profession: '模型设计',
    city: '广州',
    expertise: ['PBR', 'Q版'],
    skills: ['ZB', 'maya', 'Substance'],
    experience: '10年',
    isCollected: true,
    status: 'idle',
    gender: '女',
    description:
      '10年以上的模型制作经验,主要为迪士尼、漫威等负责模型的创意设计、外观造型设计和色彩设计。参与设计开发计划、风格主题设定,建立模型并通过3D渲染立体图进行视觉展示。熟练使用zbrush, maya, Substance Painter等软件制作生物或角色模型。',
  },
  {
    id: 2,
    name: '罗小黑',
    age: 25,
    profession: '动画设计',
    city: '深圳',
    expertise: ['角色', '场景模型'],
    skills: ['ZB', '3DMAX', 'Blender'],
    experience: '5年',
    isCollected: false,
    status: 'testing',
    gender: '男',
    description:
      '专注于角色动画和场景建模，拥有丰富的游戏行业经验。擅长制作高质量的角色模型和动画，熟悉各种3D软件和渲染技术。',
  },
  {
    id: 3,
    name: '李小明',
    age: 28,
    profession: '特效设计',
    city: '北京',
    expertise: ['影视', '怪兽'],
    skills: ['AE', 'UE5', 'Photoshop'],
    experience: '8年',
    isCollected: true,
    status: 'assigned',
    gender: '男',
    description:
      '影视特效专家，参与过多部大制作电影的特效制作。擅长粒子系统、流体模拟和后期合成，对UE5引擎有深入研究。',
  },
  {
    id: 4,
    name: '王小红',
    age: 26,
    profession: '原画设计',
    city: '上海',
    expertise: ['仙侠', '角色'],
    skills: ['Photoshop', 'Spline', 'Blender'],
    experience: '6年',
    isCollected: false,
    status: 'completed',
    gender: '女',
    description:
      '原画设计师，专注于仙侠题材的角色和场景设计。拥有深厚的美术功底，擅长概念设计和插画创作。',
  },
  {
    id: 5,
    name: '张伟',
    age: 30,
    profession: '模型设计',
    city: '杭州',
    expertise: ['动物模型', '场景模型'],
    skills: ['ZB', 'maya', 'Substance'],
    experience: '12年',
    isCollected: true,
    status: 'idle',
    gender: '男',
    description:
      '资深模型设计师，专注于生物和动物模型制作。拥有丰富的游戏和影视项目经验，对解剖学和生物结构有深入研究。',
  },
  {
    id: 6,
    name: '陈静',
    age: 24,
    profession: '动画设计',
    city: '成都',
    expertise: ['Q版', '角色'],
    skills: ['maya', '3DMAX', 'Photoshop'],
    experience: '3年',
    isCollected: false,
    status: 'testing',
    gender: '女',
    description:
      '年轻有活力的动画设计师，擅长Q版角色动画制作。对卡通风格有独特理解，作品风格清新可爱。',
  },
  {
    id: 7,
    name: '刘强',
    age: 32,
    profession: '特效设计',
    city: '武汉',
    expertise: ['海外', '棋牌'],
    skills: ['UE5', 'Blender', 'AE'],
    experience: '10年',
    isCollected: true,
    status: 'assigned',
    gender: '男',
    description:
      '国际化特效设计师，参与过多个海外项目。擅长棋牌游戏特效制作，对欧美市场有深入了解。',
  },
  {
    id: 8,
    name: '赵丽',
    age: 27,
    profession: '原画设计',
    city: '西安',
    expertise: ['PBR', '影视'],
    skills: ['Photoshop', 'Spline', 'Substance'],
    experience: '7年',
    isCollected: false,
    status: 'completed',
    gender: '女',
    description:
      '影视原画设计师，专注于PBR材质和影视级场景设计。对光影和材质有深入研究，作品写实度高。',
  },
  {
    id: 9,
    name: '孙浩',
    age: 29,
    profession: '模型设计',
    city: '南京',
    expertise: ['怪兽', '场景模型'],
    skills: ['ZB', 'maya', '3DMAX'],
    experience: '9年',
    isCollected: true,
    status: 'idle',
    gender: '男',
    description:
      '怪兽模型专家，擅长制作各种奇幻生物和怪物模型。对生物解剖学和奇幻设计有独特见解。',
  },
  {
    id: 10,
    name: '周敏',
    age: 25,
    profession: '动画设计',
    city: '重庆',
    expertise: ['角色', 'Q版'],
    skills: ['maya', 'Blender', 'Photoshop'],
    experience: '4年',
    isCollected: false,
    status: 'testing',
    gender: '女',
    description:
      '角色动画师，专注于角色表演和动作设计。对人物表情和肢体语言有深入研究，作品生动有趣。',
  },
  {
    id: 11,
    name: '吴刚',
    age: 31,
    profession: '特效设计',
    city: '青岛',
    expertise: ['影视', '海外'],
    skills: ['AE', 'UE5', 'Photoshop'],
    experience: '11年',
    isCollected: true,
    status: 'assigned',
    gender: '男',
    description:
      '资深特效设计师，参与过多部国际大片的特效制作。擅长爆炸、火焰、水流等复杂特效。',
  },
  {
    id: 12,
    name: '郑雪',
    age: 23,
    profession: '原画设计',
    city: '大连',
    expertise: ['仙侠', 'Q版'],
    skills: ['Photoshop', 'Spline', 'Blender'],
    experience: '2年',
    isCollected: false,
    status: 'completed',
    gender: '女',
    description:
      '新生代原画师，擅长仙侠题材的Q版设计。作品风格独特，色彩搭配清新，深受年轻用户喜爱。',
  },
  {
    id: 13,
    name: '何涛',
    age: 33,
    profession: '模型设计',
    city: '厦门',
    expertise: ['PBR', '动物模型'],
    skills: ['ZB', 'maya', 'Substance'],
    experience: '13年',
    isCollected: true,
    status: 'idle',
    gender: '男',
    description:
      'PBR材质专家，专注于动物模型和材质制作。对毛发、皮肤等细节表现有深入研究。',
  },
  {
    id: 14,
    name: '林娜',
    age: 26,
    profession: '动画设计',
    city: '福州',
    expertise: ['场景模型', '角色'],
    skills: ['maya', '3DMAX', 'Photoshop'],
    experience: '5年',
    isCollected: false,
    status: 'testing',
    gender: '女',
    description:
      '场景动画师，擅长大型场景的动画制作。对建筑结构和环境设计有独特理解。',
  },
  {
    id: 15,
    name: '黄磊',
    age: 28,
    profession: '特效设计',
    city: '长沙',
    expertise: ['棋牌', '怪兽'],
    skills: ['UE5', 'Blender', 'AE'],
    experience: '8年',
    isCollected: true,
    status: 'assigned',
    gender: '男',
    description:
      '棋牌游戏特效专家，擅长制作各种游戏特效。对粒子系统和动态效果有深入研究。',
  },
  {
    id: 16,
    name: '徐丽',
    age: 24,
    profession: '原画设计',
    city: '南昌',
    expertise: ['角色', '影视'],
    skills: ['Photoshop', 'Spline', 'Substance'],
    experience: '3年',
    isCollected: false,
    status: 'completed',
    gender: '女',
    description:
      '角色原画师，专注于影视级角色设计。对人物造型和服装设计有独特见解。',
  },
  {
    id: 17,
    name: '朱军',
    age: 30,
    profession: '模型设计',
    city: '合肥',
    expertise: ['海外', '场景模型'],
    skills: ['ZB', 'maya', '3DMAX'],
    experience: '10年',
    isCollected: true,
    status: 'idle',
    gender: '男',
    description:
      '国际化模型师，参与过多个海外项目。擅长欧美风格的建筑和场景模型制作。',
  },
  {
    id: 18,
    name: '杨洋',
    age: 25,
    profession: '动画设计',
    city: '石家庄',
    expertise: ['Q版', '动物模型'],
    skills: ['maya', 'Blender', 'Photoshop'],
    experience: '4年',
    isCollected: false,
    status: 'testing',
    gender: '男',
    description:
      'Q版动画师，擅长制作可爱的动物动画。作品风格活泼，深受儿童喜爱。',
  },
  {
    id: 19,
    name: '谢芳',
    age: 27,
    profession: '特效设计',
    city: '太原',
    expertise: ['仙侠', '角色'],
    skills: ['AE', 'UE5', 'Photoshop'],
    experience: '6年',
    isCollected: true,
    status: 'assigned',
    gender: '女',
    description:
      '仙侠特效师，专注于仙侠题材的特效制作。擅长法术效果和仙气缭绕的视觉表现。',
  },
  {
    id: 20,
    name: '韩东',
    age: 29,
    profession: '原画设计',
    city: '哈尔滨',
    expertise: ['怪兽', 'PBR'],
    skills: ['Photoshop', 'Spline', 'Substance'],
    experience: '8年',
    isCollected: false,
    status: 'completed',
    gender: '男',
    description:
      '怪兽原画师，擅长设计各种奇幻生物。对生物结构和奇幻元素有深入研究。',
  },
  // 添加更多数据以支持分页
  ...Array.from({ length: 80 }, (_, index) => {
    const names = [
      '张三',
      '李四',
      '王五',
      '赵六',
      '钱七',
      '孙八',
      '周九',
      '吴十',
      '郑十一',
      '王十二',
    ];
    const cities = [
      '北京',
      '上海',
      '广州',
      '深圳',
      '杭州',
      '成都',
      '武汉',
      '西安',
      '南京',
      '重庆',
    ];
    const professions = ['模型设计', '动画设计', '特效设计', '原画设计'];
    const expertiseOptions = [
      'PBR',
      'Q版',
      '角色',
      '场景模型',
      '动物模型',
      '怪兽',
      '仙侠',
      '影视',
      '海外',
      '棋牌',
    ];
    const skillsOptions = [
      'ZB',
      'maya',
      '3DMAX',
      'AE',
      'UE5',
      'Blender',
      'Spline',
      'Photoshop',
      'Substance',
    ];
    const experiences = ['应届', '1年', '1-3年', '3-5年', '5-10年', '10年以上'];
    const statuses = ['idle', 'testing', 'assigned', 'completed'];
    const genders = ['男', '女'];

    return {
      id: 21 + index,
      name: names[index % names.length] + (index + 1),
      age: 20 + (index % 15),
      profession: professions[index % professions.length],
      city: cities[index % cities.length],
      expertise: expertiseOptions.slice(0, 2 + (index % 3)),
      skills: skillsOptions.slice(0, 2 + (index % 3)),
      experience: experiences[index % experiences.length],
      isCollected: index % 3 === 0,
      status: statuses[index % statuses.length] as any,
      gender: genders[index % genders.length] as any,
      description: `拥有${experiences[index % experiences.length]}的${professions[index % professions.length]}经验，专注于${expertiseOptions[index % expertiseOptions.length]}领域，擅长使用${skillsOptions[index % skillsOptions.length]}等软件进行创作。`,
    };
  }),
];

// 游人管理菜单 - 同级结构
const visitorManagementMenus = [
  {
    meta: {
      order: 1,
      title: '游人管理',
      icon: 'mdi:account-group',
    },
    name: 'VisitorManagement',
    path: '/visitor-management',
    component: '/visitor-management/index',
  },
  {
    meta: {
      order: 2,
      title: '游人搜索',
      icon: 'mdi:account-search',
    },
    name: 'VisitorSearch',
    path: '/visitor-search',
    component: '/visitor-management/visitor-search/index',
  },
];

export const MOCK_MENUS = [
  {
    menus: [...visitorManagementMenus],
    username: 'vben',
  },
  {
    menus: [...visitorManagementMenus],
    username: 'admin',
  },
  {
    menus: [...visitorManagementMenus],
    username: 'jack',
  },
];

export const MOCK_MENU_LIST = [
  {
    id: 1,
    name: 'VisitorManagement',
    status: 1,
    type: 'menu',
    icon: 'mdi:account-group',
    path: '/visitor-management',
    component: '/visitor-management/index',
    meta: {
      icon: 'mdi:account-group',
      title: '游人管理',
      order: 1,
    },
  },
  {
    id: 2,
    name: 'VisitorSearch',
    status: 1,
    type: 'menu',
    icon: 'mdi:account-search',
    path: '/visitor-search',
    component: '/visitor-management/visitor-search/index',
    meta: {
      icon: 'mdi:account-search',
      title: '游人搜索',
      order: 2,
    },
  },
];

export function getMenuIds(menus: any[]) {
  const ids: number[] = [];
  menus.forEach((item) => {
    ids.push(item.id);
    if (item.children && item.children.length > 0) {
      ids.push(...getMenuIds(item.children));
    }
  });
  return ids;
}
